import { defineStore } from "pinia"

import { getCityAll } from '@/services'

const useCityStore = defineStore("city", {
  state: () => ({
    allCity: {},

    currentCity: {cityName: "广州"}
  }),
  actions: {
    async fetchAllCitiesData() {
      const res = await getCityAll()
      this.allCity = res.data
    }
  }
})

export default useCityStore